The color of the light reflected by an object depends on the color of the light source illuminating it. The human brain is capable of adapting to color changes in light, so that a white object, for example, is perceived as white even if the light source is emitting light affected by a dominant color.
This is not the case when an image of the object is captured by an image sensor, such as a video camera or still camera. Depending on the light, a white object may then appear tinted.
To avoid this distortion to the color of the object, the captured image can undergo digital processing intended to restore the original color of the object represented in the image. This type of digital processing is conventionally called “white balance correction.” There are known white balance correction algorithms, such as the Gray World Assumption algorithm described in the document ‘A spatial processor model for object color perception’ by Buchsbaum, G., Journal of the Franklin Institute 310(1) (1980) 337-350, or in the document ‘An Introduction to Color, John Wiley & Sons’ by Evans, R. M., New York, 1948. An algorithm of this type is based on a theory in which an image is generally gray in color, or more specifically, in which the sum of the colors red (R), green (G), and blue (B) of a captured image corresponds to the color gray.
White balance correction is then determined on the basis of information concerning the red green and blue colors for a given image. To determine whether an image is affected with white balance deviation, the image is checked to see whether it is generally gray in color. If this is the case, no white balance correction is applied. Otherwise a correction to be applied to the captured image is determined.
However, an algorithm of this type can yield inappropriate image correction in certain cases, particularly when the image in question is of an object which is monochromatic. The average color of the captured image may not be the color gray in this case, but there is no need to correct a white balance deviation. By applying such a correction algorithm in this case, a white balance deviation is corrected which does not exist.
Conversely, when applying this type of image correction algorithm, it is possible that a white balance deviation in the image is not corrected when it would be advantageous to do so. Such can be the case when the average color of the captured image is gray although certain areas of the image have a white balance deviation.